<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<script src="../../js/Width.js" type="text/javascript" charset="utf-8"></script>
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../../css/taskDetalis.css"/>
		
	</head>

	<body>
		<div id="teask">
			<header class="mui-bar mui-bar-nav">
				<a style="color: #fff;" class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
				<h1 class="mui-title" style="color: #fff;">任务详情</h1>
				<div class="save" @click="saveClick">提交</div>
			</header>
			<div class="content">
				<div class="title padding15">对园区内供水、采暖设备保养</div>
				<div class="list-wapper">
				<div class="list-item" v-for="item in listData" @click="itemClick(item)">
					<div :class="item.sate?'item-icon2':'item-icon1'"></div>
					<div class="item-text">{{item.text}}</div>
				</div>
			</div>
			</div>
			
		</div>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/util.js" type="text/javascript" charset="utf-8"></script>
		<script src="https://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js"></script>
		<script type="text/javascript">
			mui.init()
			var list = [
			          {
					   	id:01,
					   	text:'从系统相册中选择图片或视频文件。每次仅能选择一个文件，选择后将返回选择的文件路径。',
					   },
					    {
					   	id:02,
					   	text:'保存文件到系统相册中。 每次仅能保存一个文件，支持图片类型',
					   },
					    {
					   	id:03,
					   	text:'仅在多图片选择时生效，相册选择界面将选中指定的图片路径列表。 ',
					   },
					    {
					   	id:04,
					   	text:'系统相册选择器中可选择的文件类型，可设置为仅选择图片文件（“image”）',
					   },
					    {
					   	id:05,
					   	text:'仅在支持多选时有效，取值范围为1到Infinity，默认值为Infinity，',
					   },
					    {
					   	id:06,
					   	text:'使用相册多选图片时，可通过maximum属性设置最多选择的图片数量',
					   },
			      ]
			    list.forEach(function(item,num){
					item.sate = false
				})
			  
			mui.plusReady(function() {
				FastClick.attach( document.body );  
				var orderID = plus.webview.currentWebview().orderID;
				console.log(orderID)
			})
			
			
			var teask = new Vue({
				el:'#teask',
				data:{
					listData:[]
				},
				methods:{
					itemClick:function(item){
						var listData = this.listData
						listData.forEach(function(son,num){
							if(item.text == son.text){
								son.sate = !son.sate
							}
						})
						this.listData = listData
					},
					saveClick:function(){
						var newList = []
						var listData = this.listData
						listData.forEach(function(son,num){
							if(son.sate == true){
								newList.push(son)
							}
						})
						if(newList.length!==0){
							mui.toast('提交成功！')
							setTimeout(function(){
								mui.back()
							},1000)
						}else{
							mui.toast('请先选择')
						}
						console.log(newList)
					}
				}
			})
			  teask.listData = list
		</script>
	</body>
</html>